package com.dom.domweb.dao.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.dom.common.enums.SysCodeTblEnum;
import com.dom.domweb.dao.entity.TSysCodeTbl;
import com.dom.domweb.dao.mapper.TSysCodeTblMapper;
import com.dom.domweb.dao.service.ITSysCodeTblService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * B_系统码表 服务实现类
 * </p>
 *
 * @author xllei
 * @since 2018-11-17
 */
@Service
public class TSysCodeTblServiceImpl extends ServiceImpl<TSysCodeTblMapper, TSysCodeTbl> implements ITSysCodeTblService {
    @Override
    public List<TSysCodeTbl> findSysCode(SysCodeTblEnum sysCodeTblEnum) {
        Wrapper<TSysCodeTbl> wrapper = new EntityWrapper<>();
        wrapper.eq("sys_code", sysCodeTblEnum.getCode());
        return selectList(wrapper);
    }

    @Override
    public List<TSysCodeTbl> findSysCode(int type) {
        Wrapper<TSysCodeTbl> wrapper = new EntityWrapper<>();
        wrapper.eq("sys_code", type);
        return selectList(wrapper);
    }
}
